<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>
<%@ include file="/WEB-INF/tiles2/common.jsp" %>
<div class="page-header">
	<h3 class="font24">Q & A</h3>
</div>
<article>
	<div class="row">
		<div class="span6 offset1">
			<form class="form-inline" id="findfrm">
				<select name="ftype" class="input-small">
					<option value="title">제  목</option>
					<option value="uid">작성자</option>
					<option value="contents">본  문</option>
				</select>
				<input type="text" name="fkey" id="fkey"
				class="span3">
				<a class="btn btn-inverse">
					<i class="icon-search icon-white"></i>&nbsp;검색</a>
			</form>
		</div>
		<div class="span4 tright">
			<a class="btn" id="newbtn">
			<i class="icon-plus-sign"></i>&nbsp;새글쓰기</a>
		</div>
		<div class="span1">&nbsp;</div>
	</div>
	
	<div class="row">
		<div class="span10 offset1">
			<table class="table table-striped linetopdown">
				<thead>
					<tr>
						<th scope="col">번호</th>
						<th scope="col">제목</th>
						<th scope="col">작성자</th>
						<th scope="col">작성일</th>
						<th scope="col">추천</th>
						<th scope="col">조회</th>
					</tr>
				</thead><!-- 제목행 -->
				<tbody>
					<tr>
						<th>공지</th>
						<th><div class="tb-left"><span class="label label-important">
						Hot!</span>	이번 구정연휴는 4일연속 휴무입니다</div></th>
						<th>운영자</th>
						<th>2014.02.05</th>
						<th>10</th>
						<th>128</th>
					</tr><!-- 공지사항 -->
					<!-- 본문행 출력시작! -->
					<c:forEach var="b" items="${boards}">
						<tr><td>${b.bno}</td>
						<td><div class="tb-left"><a href="board/view.mvc?bno=${b.bno}&bid=">
							${b.title}</a></div></td>
						<td>${b.uid}</td><td>${fn:substring(b.regdate, 0, 10)}</td>
						<td>${b.goods}</td><td>${b.reades}</td></tr>
					</c:forEach>	
					<!-- 본문행 출력끝! -->					
				</tbody>
			</table>
		</div>
	</div>

	<div class="pagination pagination-centered">
		<ul>
			<li><a href="">이전</a></li>
			<li><a class="cpage" href="">1</a></li>
			<li><a href="">2</a></li>
			<li><a href="">3</a></li>
			<li><a href="">4</a></li>
			<li><a href="">5</a></li>
			<li><a href="">6</a></li>
			<li><a href="">7</a></li>
			<li><a href="">8</a></li>
			<li><a href="">9</a></li>
			<li><a href="">10</a></li>
			<li><a href="">다음</a></li>			
		</ul>
		
	</div>


</article>

<script>
	$("#newbtn").on("click", function(event) {
		$(location).attr("href", 
				"<c:url value='/board/write.mvc'/>");
	});
</script>















